# Contributor: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
# Maintainer: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
pkgname=m2r2
pkgver=0.3.3
pkgrel=1
pkgdesc="Markdown to reStructuredText converter"
url="https://crossnox.github.io/m2r2"
arch="all"
license="MIT"
depends="python3 py3-docutils py3-mistune1 py3-setuptools py3-setuptools_scm"
checkdepends="py3-pytest py3-six"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/CrossNox/m2r2/archive/v$pkgver.tar.gz
	mistune1.patch
	no-circular-import.patch
	"
options="!check" # fail for some reason

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
502ac414e023579590078df3cf2bc704434ae8dcfde771b1085be99347499047c7000e7b8eb8bfeedb42e0a835f1871c1f01b198318225d6ced396d2bbafde20  m2r2-0.3.3.tar.gz
9c5e062b8bff6db108894b33971499a8d0badd187414ab5ffe40934fe7894239189e89a1aa592da428d228d640d3e4f9c10b5aa89553dafe37734b896a5c3f32  mistune1.patch
3f6c03ac0244b9514a830449a1ac57d2cecd30b5f5c84301eb68f304d3d8e6e6287770c9ea8144c6cee9d00c21b48e6d88ace0e92e80ee460c6c6d02cb29c34f  no-circular-import.patch
"
